package com.fu.jdbc2;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 付大大
 * @description
 * @create 2021-01-31 13:17
 */
public class Myconnection3 extends MyAdapter {

    private Connection connection;
    private List<Connection> pool;


    public Myconnection3(Connection connection, List<Connection> pool) {
        super(connection);
        this.connection = connection;
        this.pool = pool;
    }

    @Override
    public void close() throws SQLException {
        pool.add(connection);
    }
}
